public class ForTest2 {
    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 10 ; i+=2) {
            sum += i;

        }
        System.out.println(sum);


       //sum =26;
        int sum1 = 0;
        for (int i = 1; i <= 10 ; i++) {
            if(i % 2 == 1){
                sum1 += i;
            }

        }
        System.out.println(sum1);

        int sum2 = 0;
        for (int i = 1; i <=20 ; i++) {
            if(i % 2 ==1){
                sum2 += i;
            }

        }
        System.out.println(sum2);

        int sum3 = 0;
        for (int i = 1; i <=20 ; i+=2) {
            sum3 += i;

        }
        System.out.println(sum3);

        int sum4 = 0;
        for (int i = 2; i <=20 ; i++) {
            if(i % 2 == 0){
                sum4 += i;
            }
        }
        System.out.println(sum4);

        int sum5 = 0;
        for (int i = 0; i <=20 ; i++) {
            sum5 += i;

        }
        System.out.println(sum5);

        int sum6 = 0;
        for (int i = 2; i <=10 ; i++) {
            if(i%2==0){
                sum6 += i;
            }

        }
        System.out.println(sum6);

        double sum7 = 0;
        for (int i = 2; i <= 100 ; i++) {
            if(i%2==0){
                sum7 += 1/(double)i;   // int => double    (double) {(int)1 + (double)0.1d+ (float)0.1f}
             }

        }
        double sum8 = 0;
        for (int b = 1; b <=100; b++) {
            sum8 += 1/b;

        }
        System.out.println(sum8);
    }
}
